package com.ad.pet.app.main.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ad.pet.R;
import com.ad.pet.common.data.utils.glide.GlideUtil;
import com.ad.pet.models.remote.main.Drawer;

import java.util.List;

/**
 * Created by SEELE on 2018/8/30.
 */

public class DrawerSelectAdapter extends BaseQuickAdapter<Drawer,BaseViewHolder>{


    public DrawerSelectAdapter(@Nullable List<Drawer> data) {
        super(R.layout.item_drawaer_chose_layout, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, final Drawer item) {
        TextView tvTitle = helper.getView(R.id.tv_title);
        ImageView ivHead = helper.getView(R.id.iv_head);

        GlideUtil.loadNoDefault(mContext,item.getImgUrl(),ivHead);
        tvTitle.setText(item.getName());


    }
}
